import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import '/../../global_widgets/setting_item.dart';
import 'logic.dart';

class MinePage extends StatelessWidget {
  final MineLogic logic = Get.put(MineLogic());

  // final MineState state = Get.find<MineLogic>().state;

  @override
  Widget build(BuildContext context) {
    return GetBuilder(
        init: logic,
        initState: (_) {},
        builder: (logic) {
          return Scaffold(
              appBar: AppBar(
                title: Text('个人信息'),
                centerTitle: true,
              ),
              body: ListView(
                children: [
                  SettingItem(
                    title: '头像',
                    contentView: Padding(
                      padding: EdgeInsets.all(6),
                      child: Image.asset(
                        'assets/icons/cat.jpeg',
                      ),
                    ),
                    height: 260.h,
                  ),
                  SettingItem(
                    title: '昵称',
                    content: '拿刀砍人手别抖',
                    textAlign: TextAlign.end,
                    height: 180.h,
                  ),
                  SettingItem(
                    title: '微信号',
                    content: '1234556',
                    textAlign: TextAlign.end,
                    height: 180.h,
                  ),
                  SettingItem(
                    title: '二维码',
                    contentView: Icon(Icons.qr_code_2_rounded),
                    height: 180.h,
                  ),
                  SettingItem(
                    title: '更多信息',
                    height: 180.h,
                  ),
                  SizedBox(
                    height: 120.h,
                  ),
                  Center(
                    child: Text('退出登录'),
                  )
                ],
              ));
        });
  }
}
